Optical encoders are used to measure the displacement of a substrate or other article of interest. Typically an optical encoder includes a light source, a scale which is attached to the substrate or other article of interest, and a photosensing element. The scale modulates light directed from the light source by reflecting, transmitting, and/or blocking some of the light. The photosensing element is positioned to sense the modulated light and generates an output signal corresponding to the modulated light. Displacement of the article of interest is determined by analyzing the output signal of the photosensor.